package com.yidu.BusinessDealWith.mapper;

import com.yidu.BusinessDealWith.entity.TaSettlement;
import com.yidu.TAManagement.entity.TABusiness;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
@Mapper
public interface TaSettlementMapper {

    /**
     * 修改基金信息
     * @param TAId
     * @return
     */
    @Update("update TABusiness set businessState='1' where TAId=#{TAId}")
    public int updateTaSettlement(String TAId);
    /**
     * 修改基金信息
     * @param TAId
     * @return
     */
    @Update("update TABusiness  set businessState='2' where TAId=#{TAId}")
    public int updateTaSettlementTwo(String TAId);
    /**
     * 按条件查询加分页
     * @param taSettlementMap 查询的条件  页码 每页显示的行数
     * @return 返回基金的集合
     *  ${strWhere} =“   and userName  like '%admin%' and roleId =1 ”
     */
    @Select("select * from tabusiness where 1=1  ${strWhere} limit #{start},#{pageRows}")
    public List<TABusiness> selectTABusiness(Map taSettlementMap);

    @Select("select count(*) from TABusiness where 1=1  ${strWhere}")
    public int total(Map taSettlementMap);
}
